<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="Partytown Test Page" />
    <title>Partytown Intercom 🎉</title>
    <style>
      body {
        font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif,
          Apple Color Emoji, Segoe UI Emoji;
        font-size: 12px;
      }
      h1 {
        margin: 0 0 15px 0;
      }
      ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
      }
      a {
        display: block;
        padding: 16px 8px;
      }
      a:link,
      a:visited {
        text-decoration: none;
        color: blue;
      }
      a:hover {
        background-color: #eee;
      }
      li {
        display: flex;
        margin: 15px 0;
      }
      li strong,
      li code,
      li button {
        white-space: nowrap;
        flex: 1;
        margin: 0 5px;
      }
    </style>
    <script>
      partytown = {
        debug: true,
        forward: [],
        logCalls: true,
        logGetters: true,
        logSetters: true,
        logImageRequests: true,
        logSendBeaconRequests: true,
        logStackTraces: false,
        logScriptExecution: true,
        logMainAccess: true,
      };
    </script>
    <!-- prettier-ignore -->
    <script>!function(n,t){var r=n.partytown||{},e=r.forward||[],p=t.createElement("script");function u(t){return function(){(n._ptf=n._ptf||[]).push(t,arguments)}}e.map((t=>{n[t[0]]=1===t[1]?function(n,t){return(t=[]).push=u(n),t}(t):u(t)})),p.async=p.defer=!0,p.src=(r.lib||"/~partytown/")+(r.debug?"debug/":"")+"partytown.js",t.head.appendChild(p)}(window,document);</script>
  </head>
  <body>
    <h1>Partytown Intercom 🎉</h1>

    <script type="text/partytown">
      //Set your APP_ID
      var APP_ID = 'fyq3wodw';
      var HACK_URL = 'shim.latest.js';

      window.intercomSettings = {
        app_id: APP_ID,
      };
      (function () {
        var w = window;
        var ic = w.Intercom;
        if (typeof ic === 'function') {
          ic('reattach_activator');
          ic('update', w.intercomSettings);
        } else {
          var d = document;
          var i = function () {
            i.c(arguments);
          };
          i.q = [];
          i.c = function (args) {
            i.q.push(args);
          };
          w.Intercom = i;
          var l = function () {
            var s = d.createElement('script');
            s.type = 'text/javascript';
            s.async = true;
            //s.src = 'https://widget.intercom.io/widget/' + APP_ID;
            s.src = HACK_URL;
            var x = d.getElementsByTagName('script')[0];
            x.parentNode.insertBefore(s, x);
          };
          if (document.readyState === 'complete') {
            l();
          } else if (w.attachEvent) {
            w.attachEvent('onload', l);
          } else {
            w.addEventListener('load', l, false);
          }
        }
      })();
    </script>

    <hr />
    <p><a href="./standard.html">Standard Intercom</a></p>
    <p><a href="/tests/">All Tests</a></p>
  </body>
</html>
